TrafficModel Class Reference

#include <TrafficModel.h>

List of all members.

Static Public Member Functions

static osg::ref_ptr< osg::Group > circularTrafficSign (string textureFilename)
static osg::ref_ptr< osg::Group > triangularTrafficSign (string textureFilename, int duz_mu)
static osg::ref_ptr< osg::Group > trafficLight (int lamba_id)
static osg::ref_ptr< osg::Group > trafficLight1 (int lamba_id)
static void initialize ()

Static Private Attributes

static vector< osg::ref_ptr<
osg::Group > > 
light


Detailed Description

This class encapsulates the traffic elements models including traffic lights and signs

Definition at line 8 of file TrafficModel.h.


Member Function Documentation

osg::ref_ptr< osg::Group > TrafficModel::circularTrafficSign (  string  textureFilename  )  [static]
 

returns a circular traffic sign group with texture whose pathname is given by the only argument

Definition at line 36 of file TrafficModel.cpp.

Referenced by TrafficSign::draw().

void TrafficModel::initialize (   )  [static]
 

this function fills light vector with the three traffic light models. later trafficLight function is called to return the already placed models in the array.

Definition at line 3 of file TrafficModel.cpp.

References KIRMIZI, light, SARI, trafficLight1(), and YESIL.

Referenced by RightView::SetSceneData().

osg::ref_ptr< osg::Group > TrafficModel::trafficLight (  int  lamba_id  )  [static]
 

returns the traffic light model as a Group

Parameters:
lamba_id is RED for red light, YELLOW for yellow, GREEN for green

Definition at line 21 of file TrafficModel.cpp.

References KIRMIZI, light, SARI, and YESIL.

Referenced by TrafficLight::changeColor(), TrafficLight::changeColorAnim(), and AnimationWindow::generateSeq().

osg::ref_ptr< osg::Group > TrafficModel::trafficLight1 (  int  lamba_id  )  [static]
 

called when iniatilize is called and the three traffic lights are added to light vector.

Parameters:
lamba_id is RED for red light, YELLOW for yellow, GREEN for green

Definition at line 201 of file TrafficModel.cpp.

Referenced by initialize().

osg::ref_ptr< osg::Group > TrafficModel::triangularTrafficSign (  string  textureFilename,
int  duz_mu
)  [static]
 

returns a triangular traffic sign group

Parameters:
textureFilename is the etxture file name for the sign
duz_mu is 0 for a sign with shape \/ and 1 for a sign with shape /\

Definition at line 77 of file TrafficModel.cpp.

Referenced by TrafficSign::draw().


Member Data Documentation

vector< osg::ref_ptr< osg::Group > > TrafficModel::light [static, private]
 

this vector is filled with three traffic light models when inialize() is called

Definition at line 13 of file TrafficModel.h.

Referenced by initialize(), and trafficLight().


The documentation for this class was generated from the following files:
Generated on Sun May 28 18:54:15 2006 for TraffEdu by  doxygen 1.4.6-NO